#include <bits/stdc++.h>
#define sc(x) scanf("%lld", &(x))
#define pr(x) printf("%lld\n", (x))
#define rep(i, l, r) for (int i = l; i <= r; ++i)
using namespace std;
typedef long long ll;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
inline ll getMaxNum(ll n) {  // 字串长度
    return (n) * (n - 1) / 2;
    // 返回最大逆序数
}
inline ll getLength(ll x) {
    ll L = 1, R = x, mid, ans = R;
    while (L <= R) {
        mid = L + R >> 1;
        if (getMaxNum(mid) >= x) {
            ans = min(ans, mid);
            R = mid - 1;
        } else
            L = mid + 1;
    }
    return ans;
}
inline ll xza(ll x) {
    ll res = sqrt(sqrt(x * 2) + 2 * x) + 1;
    if (getMaxNum(res) != x) {
        cout << x << ' ' << res << '\n';
        exit(0);
    } else
        return res;
}
int cnt[40];
int main() {
    // ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    ll n;
    cin >> n;
    rep(i, 2, 10000) xza(i);
    // rep(i, 1, 20) cout << i << ' ' << xza(i) << '\n';
    ll len = getLength(n), x = len / 26, r = n - 26 * x;
    cout << len << '\n';
    // if (x) rep(i, 0, 25) cnt[i] = x;
    // rep(i, 0, r - 1)++ cnt[i];
    // string s;
    // for (int i = 25; ~i; --i) {
    //     rep(j, 1, cnt[i]) s += char('a' + i);
    // }
    return 0;
}